<?php
require "../framework.php";



/*foreach (mysql::getTableField("mitarbeiter") as $tableField)
        {
            
            echo $tableField;
            
            
            
        }
        
        exit;*/




//$tableList=mysql::getTable();

//print_r($tableList);

foreach (mysql::getTable() as $table)
    {
    if (db::getCount("_table", "table_name='$table'") == 0)
        {

        db::createTable($table);
        }

    $tableId=db::getId("_table", "table_name='$table'");

    foreach (mysql::getTableField($table) as $tableField)
        {
            
            //echo "__table='$tableId' AND field_name='$tableField'";
        if (db::getCount("_table_field", "__table='$tableId' AND field_name='$tableField'") == 0)
            {
            db::addTableField($table, $tableField, "text");
            //echo "add";
            }
        }
    }
?>